header
  • prevSection
  • prev
  • nextSection
  • Navigation Arrow
  • SQL
  • Navigation Arrow
  • DML
  • Navigation Arrow
  • Insert to Table

Data Manipulation Language (DML)

Insert to Table

When wishing to add data to a table we use the INSERT INTO command. The syntax for the insert command is:

INSERT INTOstudents
VALUES2, ‘robert’,’robertson’)

As above, using the students table, we have inserted a new record with a student id of 2, first name: Robert, surname: Robertson.

Note that if you wish to induce a field to be blank, merely use the keyword NULL as the following example shows

INSERT INTOstudents
VALUES(2, NULL,’robertson’)
  • prevSection
  • prev
  • nextSection
  • Navigation Arrow
  • SQL
  • Navigation Arrow
  • DML
  • Navigation Arrow
  • Insert to Table